package no.ntnu.fp.handlers;

import no.ntnu.fp.handler.Handler;
import no.ntnu.fp.messages.Message;
import no.ntnu.fp.messages.impl.RejectNoticeMessage;
import no.ntnu.fp.services.NoticeService;

public class RejectNoticeHandler implements Handler {
	private final NoticeService noticeService;
	
	public RejectNoticeHandler(NoticeService noticeService) {
		this.noticeService = noticeService;
	}

	@Override
	public void handleMessage(Message message) {
		RejectNoticeMessage rejectNoticeMessage = (RejectNoticeMessage) message;
		
		noticeService.rejectNotice(rejectNoticeMessage.getNotice());
		
	}

}
